<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="com.google.appengine.api.users.User" %>
<%@ page import="com.google.appengine.api.users.UserService" %>
<%@ page import="com.google.appengine.api.users.UserServiceFactory" %>
<%
   UserService userService = UserServiceFactory.getUserService();
   User user = userService.getCurrentUser();
   if (user == null)
   {
      response.sendRedirect(userService.createLoginURL(request.getRequestURI()));
   }
   else
   {
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
   <head>
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <link type="text/css" rel="stylesheet" href="dcExplorer.css">
      <title>dcExplorer</title>
      
      <!--                                           -->
      <!-- This script loads your compiled module.   -->
      <!-- If you add any GWT meta tags, they must   -->
      <!-- be added before this line.                -->
      <!--                                           -->
      <script type="text/javascript" language="javascript" src="dcexplorer/dcexplorer.nocache.js"></script>
   </head>
 
   <body>
 
      <!-- OPTIONAL: include this if you want history support -->
      <iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1' style="position:absolute;width:0;height:0;border:0"></iframe>
      <div id="content">
         <div id="menu"><strong><%= user.getEmail() %></strong> | <a href="<%= userService.createLogoutURL("/") %>">Sign out</a></div>
         <h1>dcExplorer management console</h1>
         <div id="mainPanel"></div>
      </div>
   </body>
</html>
<%
}
%>
